#@head() 
#@header()
<title>工单管理</title>
#@aside("ticket")
<div class="content-wrapper">
	<section class="content">
		<div class="row">
			<div class="col-md-12">
				<!-- Custom Tabs -->
				<div class="nav-tabs-custom">
					<ul class="nav nav-tabs">
						<li #if(type== "create") class="active" #end><a
							href="#(path)/ticket/mylist?type=create">我发起的</a></li>
						<li #if(type== "follow") class="active" #end><a
							href="#(path)/ticket/mylist?type=follow">跟踪中</a></li>
						<li #if(type== "finish") class="active" #end><a
							href="#(path)/ticket/mylist?type=finish">已完结</a></li>
						<li class="pull-right"><a href="#(path)/ticket/add"
							class="text-muted"><button type="button"
									class="btn btn-block btn-info">添加工单</button></a></li>
					</ul>
					<div class="tab-content">
						<div class="tab-pane active" id="tab_1">
							<div class="row">
								<div class="col-xs-12">
									<table class="table table-striped">
										<thead>
											<tr>
												<th>ID</th>
												<th>客户姓名</th>
												<th>客户号码</th>
												<th>问题描述</th>
												<th>工单状态</th>
												<th>日期</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody>
											#for(Lis:list.list)
											<tr>
												<td>#(Lis.id)</td>
												<td>#(Lis.getClient().realname)</td>
												<td>#(Lis.phone)</td>
												<td>#(Lis.description)</td>
												<td>#if(Lis.step==1) <label class="label label-warning">跟踪中</label>
													#elseif(Lis.step==2) <label class="label label-success">审批中</label>
													#elseif(Lis.step==3) <label class="label label-success">归档</label>
													#else <label class="label label-primary">未知</label> #end
												</td>
												<td>#(date.stampToDate(Lis.createtime??"1"))</td>
												<td>#if(type == "create") <a
													href="#(path)/ticket/add?id=#(Lis.id)"
													class="btn btn-success">编辑</a> #end <a
													href="#(path)/ticket/process?id=#(Lis.id)&type=view"
													class="btn btn-info">查看</a>
												</td>
											</tr>
											#end
										</tbody>
									</table>
								</div>
								#@paginate(list.pageNumber, list.totalPage, path+"/ticket/mylist?page=")
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>
#@footer()
</body>
</html>